<div class="col-lg-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>订单列表</h5>

            <div class="ibox-tools">
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="#">Config option 1</a>
                    </li>
                    <li><a href="#">Config option 2</a>
                    </li>
                </ul>

            </div>
        </div>
        <div class="ibox-content">
            <input type="text" class="form-control input-lg m-b-xs" id="filter"
                   placeholder="搜索">

            <table class="footable table table-hover table-bordered" data-page-size="7" data-filter=#filter>
                <thead>
                <tr>
                    <th>下单时间</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>地址</th>
                    <th>留言</th>
                    <th>商品名称</th>
                    <th data-hide="phone,tablet">规格</th>
                    <th data-hide="phone,tablet">支付金额</th>
                    <th data-hide="phone,tablet">订单状态</th>
                    <th data-hide="phone,tablet">处理订单</th>
                </tr>
                </thead>
                <tbody>
                {foreach $DATA as $value}
                <tr class="gradeX">
                    <td>{$value['add_time']}</td>
                    <td>{$value['link_man']}</td>
                    <td>{$value['phone']}</td>
                    <td>{$value['address']}</td>
                    {if condition="$value.message eq null"}
                    <td>
                        <small>默认</small>
                    </td>
                    {else/}
                    <td>{$value['message']}</td>
                    {/if}
                    <td>{$value['title']}</td>
                    <td>{$value['marque']}</td>
                    <td class="center">{$value['total_fee']}</td>
                    <td class="center">
                        {if condition="$value.type eq 1"}
                        <span class="label label-default">未支付</span>
                        {elseif condition="$value.type eq 2"/}
                        <span class="label label-warning">已支付/未发货</span>
                        {elseif condition="$value.type eq 3"/}
                        <span class="label label-info">已发货/运输中</span>
                        {elseif condition="$value.type eq 4"/}
                        <span class="label label-danger">申请退货</span>
                        {elseif condition="$value.type eq 5"/}
                        <span class="label label-warning">已同意退货</span>

                        {elseif condition="$value.type eq 6"/}
                        <span class="label label-warning"> 交易完成</span>
                        {/if}
                    </td>
                    <td>
                        {if condition="$value.type eq 2"}
                        <a data-toggle="modal" name="change" data-target="#myModal{$value['id']}">
                            我要发货
                        </a>
                        <!-- Modal -->
                        <div class="modal fade" id="myModal{$value['id']}" tabindex="-1" role="dialog"
                             aria-labelledby="myModalLabel"
                             aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel">确定要发货？</h4>
                                    </div>
                                    <div class="modal-body">
                                        <form method="post" class="form-horizontal form2">
                                            <div class="form-group"><label
                                                    class="col-sm-2 control-label">请输入yes：</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" id="ceshi{$value['id']}">
                                                </div>
                                            </div>

                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                        <button type="button" class="btn btn-primary" name="save" id="{$value['id']}"
                                                state="{$value['type']}">保存
                                        </button>
                                    </div>

                                </div>
                            </div>
                        </div>
                        {elseif condition="$value.type eq 4"}
                        <a data-toggle="modal" name="change2" data-target="#myModal2{$value['id']}" data-id="{$value['id']}">
                            退货信息
                        </a>
                        <!-- Modal -->
                        <div class="modal fade" id="myModal2{$value['id']}" tabindex="-1" role="dialog"
                             aria-labelledby="myModalLabel2"
                             aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel2">退货信息</h4>
                                    </div>
                                    <div class="modal-body">
                                        <form method="post" class="form-horizontal form">
                                            <div class="form-group"><label
                                                    class="col-sm-3 control-label">快递单号：</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control" id="express{$value['id']}"  value="" disabled>
                                                </div>
                                            </div>

                                            <div class="form-group"><label
                                                    class="col-sm-3 control-label">退货时间：</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control" id="time{$value['id']}" value="" disabled>
                                                </div>
                                            </div>

                                            <div class="form-group"><label
                                                    class="col-sm-3 control-label">退货原因：</label>
                                                <div class="col-sm-8">
                                                    <textarea  name="" class="form-control" id="reason{$value['id']}" rows="3" disabled></textarea>
                                                </div>
                                            </div>

                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                        <button type="button" class="btn btn-primary" name="agree" data-id="{$value['id']}" data-type="{$value['type']}">同意退货</button>
                                    </div>

                                </div>
                            </div>
                        </div>

                        {/if}
                    </td>
                </tr>
                {/foreach}
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="10">
                        <ul class="pagination pull-left"></ul>
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>
